//
//  HotListCollectionViewCell.m
//  DayByDay
//
//  Created by dllo on 16/5/17.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "HotListCollectionViewCell.h"
#import <UIImageView+WebCache.h>

@interface HotListCollectionViewCell ()

@property (nonatomic, strong)UIImageView *bcgImageV;
@property (nonatomic, strong)UIImageView *smallImageV;
@property (nonatomic, strong)UILabel *songLaber;
@property (nonatomic, strong)UILabel *singerLabe;

@end

@implementation HotListCollectionViewCell


- (void)setModel:(HotListModel *)model {
    _model = model;
    _songLaber.text = model.title;
    _singerLabe.text = model.author;
    [_bcgImageV sd_setImageWithURL:[NSURL URLWithString:_model.pic_url]];
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    
    return self;
}

- (void)createView {
    self.bcgImageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.width)];
    self.smallImageV = [[UIImageView alloc] initWithFrame:CGRectMake(self.contentView.frame.size.width - 50, self.contentView.frame.size.width - 50, 40, 40)];
    self.smallImageV.backgroundColor = [UIColor clearColor];
    self.smallImageV.image = [UIImage imageNamed:@"entering_record_btn_play"];
    self.songLaber = [[UILabel alloc] initWithFrame:CGRectMake(0, self.contentView.frame.size.width + 10, self.contentView.frame.size.width, 20)];
    self.singerLabe = [[UILabel alloc] initWithFrame:CGRectMake(0, self.contentView.frame.size.width + 35, self.contentView.frame.size.width, 15)];
    self.singerLabe.textColor = [UIColor lightGrayColor];
    self.singerLabe.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.bcgImageV];
    [self.contentView addSubview:self.songLaber];
    [self.bcgImageV addSubview:self.smallImageV];
    [self.contentView addSubview:self.singerLabe];
}


@end
